import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'xiaogang_logic.dart';

class XiaogangPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final logic = Get.put(XiaogangLogic());
    final state = Get
        .find<XiaogangLogic>()
        .state;

    return Obx(() {
        return Scaffold( body: state.pages[state.currentIndex.value],
        bottomNavigationBar: BottomNavigationBar(
          currentIndex: state.currentIndex.value,
          items: state.navigationIconViews.map((e) => e.item).toList(),
          type: BottomNavigationBarType.fixed,
          onTap: (index) => state.currentIndex.value = index,
        ),

      );
    });
  }
}
